package com.yc.fresh.bean;

import java.util.Objects;

/**
 * 购物车信息
 * @Auther: HuYang
 * @Date: 2022/11/28 - 11 - 28 - 21:53
 * @Description: com.yc.fresh.bean
 * @version: 1.0
 */
public class CartInfo {
    private String cno;
    private Long mno;
    private Long pno;
    private Integer num;


    @Override
    public String toString() {
        return "CartInfo{" +
                "cno='" + cno + '\'' +
                ", mno=" + mno +
                ", pno=" + pno +
                ", num=" + num +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof CartInfo)) return false;
        CartInfo cartInfo = (CartInfo) o;
        return Objects.equals(cno, cartInfo.cno) && Objects.equals(mno, cartInfo.mno) && Objects.equals(pno, cartInfo.pno) && Objects.equals(num, cartInfo.num);
    }

    @Override
    public int hashCode() {
        return Objects.hash(cno, mno, pno, num);
    }

    public String getCno() {
        return cno;
    }

    public void setCno(String cno) {
        this.cno = cno;
    }

    public Long getMno() {
        return mno;
    }

    public void setMno(Long mno) {
        this.mno = mno;
    }

    public Long getPno() {
        return pno;
    }

    public void setPno(Long pno) {
        this.pno = pno;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }
}
